﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserPassWord.aspx.cs" Inherits="ZLDC.Estate.TM.UserPassWord" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>还原密码</title>
     <link href="../css/main.css" rel="stylesheet" type="text/css" />
    <link href="../js/jquery/style/jquery.hiAlerts.css" rel="stylesheet" type="text/css" />    
    <script src="../js/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="../js/LexunJS.js" type="text/javascript"></script>
    <script src="../js/jShowDiv.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function() {

            var name = LexunJS.GetQueryString("name");
            var status = LexunJS.GetQueryString("status");
            var id = LexunJS.GetQueryString("id");
            document.getElementById("username").innerHTML = name;
            document.getElementById("uid").value = id;
            document.getElementById("status").value = status;
        });
        function UpdatePassWord() {

            var pwd = "123456"; ///
            var userid = document.getElementById("uid").value;
            var status = document.getElementById("status").value;

            $.ajax({
                type: 'POST',
                url: '../Handler/HandlerSystem.ashx',
                data: 'act=UpDatePwd&pwd=' + pwd + '&userid=' + userid + '&status=' + status,
                timeout: '10000',
                error: function() {
                    alert("系统繁忙，请稍候后试！");
                },
                success: function(outmsg) {
                    if (outmsg == "") {
                        alert(outmsg);
                    } else {
                        alert('恭喜，密码修改成功！<br>您的新密码为：' + outmsg);
                        window.close();
                    }
                }
            });

        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
     <div id="tabcontent" style="text-align: center; margin-left: 20px; margin-right: 20px;">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                       <td colspan="2">
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="blue">用户名：</font>
                           <span id="username"></span>
                       </td>
                       
                    </tr>
                    <tr>
                       <td  colspan="2">
                       该用户还原密码为：<font color="red">123456</font>
                       </td>
                    </tr>
                </table>
            </div>
            <div id="tabbottom" style="text-align: right;">
                <input id="btnOk" class="button_bak" type="button" value="确定" onclick="UpdatePassWord();" />            
                <input id="btnReturn" class="button_bak" type="button" value="返回" onclick="window.close();" />
            </div>
    </form>
    <input id="uid" type="hidden" />
    <input id="status" type="hidden" />
</body>
</html>
